public class foctorial
{
	public static void main(String[] args)
	{
		int sum=0;
		int b=1;
		for (int i = 1; i <= 3; i++)
		{
			b*=i;
			sum+=b;
		}
		System.out.println(sum);
	}
}